package 统计算法.连续三个数为奇数;

public class lxsgswjs {
    public boolean threeConsecutiveOdds(int[] arr) {
        int count = 0;
        for(int i = 0;i < arr.length;++i){
            if((arr[i] & 1) != 0 ){
                ++count;
                if(count==3){
                    return true;
                }
            }else{
                count = 0;
            }
        }
        return false;

    }
}
